// ignore_for_file: unused_element, constant_identifier_names

import 'package:get/get.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:yt_devops/resources/str_res_keys.dart';

//任务类型
enum TaskType {
  install(0),
  maintenance(1),
  report(2);

  final int value;
  const TaskType(this.value);
}

const $TaskTypeEnumMap = {
  TaskType.install: 0,
  TaskType.maintenance: 1,
  TaskType.report: 2,
};

//任务状态
//安装任务状态
enum InstallTaskStatusType {
  waitingForProcessing(0), // "待处理"
  processing(1), //"处理中"
  close(2); //"关闭(完成)"

  final int value;
  const InstallTaskStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.pending.tr;
      case 1:
        return ResKey.processing.tr;
      case 2:
        return ResKey.completed.tr;

      default:
        return '';
    }
  }
}

const $InstallTaskStatusTypeEnumMap = {
  InstallTaskStatusType.waitingForProcessing: 0,
  InstallTaskStatusType.processing: 1,
  InstallTaskStatusType.close: 2,
};

/// 维修任务状态
enum RepairTaskStatusType {
  waitingForProcessing(0), // "待处理"
  processing(1), //"处理中"
  close(2),
  repairded(3); //"关闭(完成)"

  final int value;
  const RepairTaskStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.pending.tr;
      case 1:
        return ResKey.processing.tr;
      case 2:
        return ResKey.completed.tr;
      case 3:
        return ResKey.repaired.tr;

      default:
        return '';
    }
  }
}

const $RepairTaskStatusTypeEnumMap = {
  RepairTaskStatusType.waitingForProcessing: 0,
  RepairTaskStatusType.processing: 1,
  RepairTaskStatusType.close: 2,
  RepairTaskStatusType.repairded: 3,
};

//报障任务状态
enum ReportTaskStatusType {
  waitingForProcessing(0), // "0-待处理（已申报)"
  underRepair(1), // 1-维修中
  repairCompleted(3), // 3-维修完成
  finish(6); // 6-完成

  final int value;
  const ReportTaskStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.waitingForProcessing.tr;
      case 1:
        return ResKey.repairing.tr;
      case 3:
        return ResKey.repaired.tr;
      case 6:
        return ResKey.finished.tr;

      default:
        return '';
    }
  }
}

const $ReportTaskStatusTypeEnumMap = {
  ReportTaskStatusType.waitingForProcessing: 0,
  ReportTaskStatusType.underRepair: 1,
  ReportTaskStatusType.repairCompleted: 3,
  ReportTaskStatusType.finish: 6,
};

/// 设备告警状态
@JsonEnum(valueField: "value")
enum DeviceAlarmStatus {
  normal(0),
  alarm(1);

  final int? value;
  const DeviceAlarmStatus(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.normal.tr;
      default:
        return ResKey.alarm.tr;
    }
  }
}

const $DeviceAlarmStatusTypeEnumMap = {
  DeviceAlarmStatus.normal: 0,
  DeviceAlarmStatus.alarm: 1,
};

/// 设备连接状态
@JsonEnum(valueField: 'value')
enum ConnectStatusType {
  on(1),
  off(0),
  unConfig(2);

  String get label {
    switch (value) {
      case 1:
        return ResKey.onLine.tr;
      case 0:
        return ResKey.offLine.tr;
      default:
        return ResKey.notConfigured.tr;
    }
  }

  final int? value;
  const ConnectStatusType(this.value);
}

const $ConnectStatusTypeEnumMap = {
  ConnectStatusType.on: 1,
  ConnectStatusType.off: 0,
  ConnectStatusType.unConfig: 2,
};

/// 列表操作状态
enum RefereshType {
  initial,
  refresh,
  load,
}

/// 站点状态
enum SiteStatusType {
  normal(0),
  fault(1),
  all(2);

  final int value;
  const SiteStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.normal.tr;
      case 1:
        return ResKey.alarm.tr;
      case 2:
        return ResKey.all.tr;

      default:
        return '';
    }
  }
}

const $SiteStatusTypeEnumMap = {
  SiteStatusType.normal: 0,
  SiteStatusType.fault: 1,
  SiteStatusType.all: 2,
};

/// 告警模块类型 站点/设备 非页面展示字段无需翻译
enum AlarmFromWhereType {
  defaultVal(-1),
  allSites(0),
  device(1),
  currentSite(2);

  final int value;
  const AlarmFromWhereType(this.value);

  String get label {
    switch (value) {
      case 0:
        return '多站点告警';
      case 1:
        return '设备告警';
      case 2:
        return '站点内告警';

      default:
        return '';
    }
  }
}

const $AlarmModuleTypeEnumMap = {
  AlarmFromWhereType.defaultVal: -1,
  AlarmFromWhereType.allSites: 0,
  AlarmFromWhereType.device: 1,
  AlarmFromWhereType.currentSite: 2,
};

/// 告警状态等级
enum AlarmStatusGradeType {
  error("error"),
  alarm("alarm"),
  warn("warn"),
  info("info");

  final String value;
  const AlarmStatusGradeType(this.value);

  String get label {
    switch (value) {
      case "error":
        return ResKey.error.tr;
      case "alarm":
        return ResKey.alarmImportant.tr;
      case "warn":
        return ResKey.warn.tr;
      case "info":
        return ResKey.info.tr;

      default:
        return '';
    }
  }
}

const $AlarmStatusGradeTypeEnumMap = {
  AlarmStatusGradeType.error: "error",
  AlarmStatusGradeType.alarm: "alarm",
  AlarmStatusGradeType.warn: "warn",
  AlarmStatusGradeType.info: "info",
};

/// 告警确认状态
enum AlarmConformStatusType {
  unconfirmed(0),
  confirmed(1);

  final int value;
  const AlarmConformStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.unconfirmed.tr;
      case 1:
        return ResKey.confirmed.tr;

      default:
        return '';
    }
  }
}

const $AlarmConformStatusTypeEnumMap = {
  AlarmConformStatusType.unconfirmed: 0,
  AlarmConformStatusType.confirmed: 1,
};

/// 告警状态
@JsonEnum(valueField: "value")
enum AlarmStatusType {
  generate(0),
  clear(1);

  final int value;
  const AlarmStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.inAlarm.tr;

      case 1:
        return ResKey.eliminated.tr;
      default:
        return '';
    }
  }
}

/// 告警清除状态
@JsonEnum(valueField: "value")
enum AlarmClearStatusType {
  automaticRecovery(0),
  manualElimination(1);

  final int value;
  const AlarmClearStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.automaticRecovery.tr;

      case 1:
        return ResKey.manualElimination.tr;
      default:
        return '';
    }
  }
}

const $AlarmStatusTypeEnumMap = {
  AlarmStatusType.generate: 0,
  AlarmStatusType.clear: 1,
};

/// 角色类型
enum RoleType {
  /// 超管按照安装商
  admin(1),
  installer(3),
  owner(4),
  operator(5),
  productManager(6);

  final int value;
  const RoleType(this.value);

  String get label {
    switch (value) {
      case 1:
        return 'admin';
      case 3:
        return ResKey.installManu.tr;
      case 4:
        return ResKey.mineUserManagerUserOwner.tr;
      case 5:
        return ResKey.operator.tr;
      case 6:
        return ResKey.productManager.tr;

      default:
        return '';
    }
  }
}

const $RoleTypeEnumMap = {
  RoleType.admin: 1,
  RoleType.installer: 3,
  RoleType.owner: 4,
  RoleType.operator: 5,
  RoleType.productManager: 6,
};

// 设备产品类型
///产品类型
@JsonEnum(valueField: "value")
enum ProductType {
  bussinessEnergyStorage(514), //工商业储能
  pvIntervert(515), // 光伏逆变器
  batteryExchangeCabinet(519), //换电柜
  chargeGun(523), //充电枪
  ems(524),
  batteryPack(526),
  pcs(536), //逆变器
  newBatteryPack(537),
  aircondition(538), // 空调
  electricyMeter(539), // 电表
  charge(540), // 充电桩
  localEms(541), //A型光储充
  energyElectricMeter(542), // 工商储电表
  pvEnergy(543),
  dehumidifier(544), //除湿器
  fireFighting(545), //消防
  chargeMaster(546),
  chargeTerminal(547), //充电桩终端
  windTurbine(548), //风力发电机
  solarESS(549), //光储一体机
  smallESS(550), //小型工商储
  windSolarDieselESS(551), //风光柴储
  changeOverCubicle(554); //切换柜

  static ProductType? getType(int value) =>
      ProductType.values.firstWhereOrNull((e) => e.value == value);

  final int value;
  const ProductType(this.value);
}

/// 产品ID
enum ProductIDType {
  ems(1),
  pcs(3),
  aircondition(7),
  p100CAir(49),
  bWattEms(37),
  bWattPcs(39),
  bWattAir(41),
  yTEnergyEms(59),
  yTEnergyAir(60),
  yTEnergyPcs(61),
  yTEnergyMetter(62),
  yTEnergyBatteryStack(63),
  yTEnergy(66),
  yTEnergyMetterRAIG(67),
  yTEnergyMetterDTSD(68),
  newYtEnergyMetterDTSD(95),
  yTEnergyMetterDTSD1352(87),
  newYtEnergyMetterDTSD1352(96),
  liquidEnergyAir(76),
  liquidEnergyDehumidifier(77),
  liquidEnergyPcs(79),
  liquidEnergyBatteryStack(80),
  liquidEnergyEms(83),
  liquidEnergy(84),
  liquidEnergyFireFight(85),
  energyFireFight(86),
  newLiquidCoolingEnergyEms(89), //新液冷ems
  newLiquidCoolingEnergyLiquidCooler(92), //新液冷液冷机
  small(92), //小型工商储
  smallEnergyStorage(93), //小型工商储电表
  newAirCoolingEnergyEms(98), //新风冷ems 20240112
  newAirCoolingEnergyAirCondition(101), //新风冷空调
  newLiquidCoolingEnergyBattery(107), //新液冷电池组
  YTY60GBAG12(108), //一体充电桩
  smallEnergy(109),
  smallEnergyEms(110),
  smallEnergyBatteryCluster(111),
  smallEnergyAir(113),
  smallEnergyFireFight(114),
  pvEnergy(116),
  pvEnergyEms(117),
  pvEnergyBms(118),
  pvEnergyAir(120),
  pvEnergyFirFight(121),
  pvEnergyPcs(122),
  YTYCharge601(123),
  YTYCharge602(108),
  YTYCharge801(134),
  YTYCharge802(124),
  YTYCharge1201(159),
  YTYCharge1202(158),
  YTYCharge1602(161),
  YTYCharge1601(160),
  YTYCharge1802(162),
  YTYCharge1801(163),
  YTYCharge2402(164),
  YTYCharge2401(165),
  YTYCharge3202(166),
  YTYCharge3201(167),
  YTYCharge4002(168),
  YTYCharge4001(169),

  chargeGun(125),
  chargeS2801(126),
  chargeMaster(127),
  chargeTerminal2(128),
  chargeTerminal1(129),
  FGCCEnergyEms(136),
  FGCCEnergyAir(137),
  windTurbine(138),
  FGCCEnergyBatteryStack(139),
  FGCCEnergy(140),
  FGCCEnergyBatteryCluster(142),
  FGCCEnergyBatteryModule(141),
  FGCCEnergyWindTurbine(143),
  react100XEnergy(144),
  react100XEmsEnergy(145),
  react100WMeter(147),
  react100WEnergy(148),
  react100WEmsEnergy(149),
  liquidEnergy232(150),
  liquidEnergy232Ems(151),
  liquidEnergy232Pcs(152),
  liquidEnergy232BatteryPack(153),
  liquidEnergy232BatteryModule(154),
  liquidEnergy232FireFight(157),
  YTY60GBAG1_1(179),
  YTY60GBAG1_2(180),
  YTY80GBAG1_1(181),
  YTY80GBAG1_2(182),
  YTY120GBAG1_1(183),
  YTY120GBAG1_2(184),
  YTY160GBAG1_1(185),
  YTY160GBAG1_2(186),
  YTY180GBAG1_1(187),
  YTY180GBAG1_2(188),
  YTY240GBAG1_1(189),
  YTY240GBAG1_2(190),
  YTY320GBAG1_1(191),
  YTY320GBAG1_2(192),
  YTY400GBAG1_1(193),
  YTY400GBAG1_2(194),
  YTYMaster60GBAG1_1(195),
  YTYMaster60GBAG1_2(196),
  YTYMaster80GBAG1_1(197),
  YTYMaster80GBAG1_2(198),
  YTYMaster120GBAG1_1(199),
  YTYMaster120GBAG1_2(200),
  YTYMaster160GBAG1_1(201),
  YTYMaster160GBAG1_2(202),
  YTYMaster180GBAG1_1(203),
  YTYMaster180GBAG1_2(204),
  YTYMaster240GBAG1_1(205),
  YTYMaster240GBAG1_2(206),
  YTYMaster320GBAG1_1(207),
  YTYMaster320GBAG1_2(208),
  YTYMaster400GBAG1_1(209),
  localEms400A(210),
  hwPvIntervert(211), // 华为逆变器
  zqEms(223),
  liquid2Battery16(224),
  liquidEmsGrid(228), //液冷带离并网ems
  windEmsGrid(229), //风冷带离并网ems
  lquid232CustomEms(231),
  liquidEnergy232ABatteryPack(233),
  chargeEU4801(242), //分体桩
  chargeEU3502(243), // 分体桩终端
  chargeEU5002(244), //分体桩终端
  pvInverter120k2(246),
  chargeS2401(247), // 分体桩
  chargeY3001(248), //一体桩
  chargeY3002(249), //一体桩
  chargeY3001Master(250), //一体桩主机
  chargeY3002Master(251), //一体桩主机
  liquid215CustomEms(256),
  kTL3PV(259),
  YTS480CEAG1(268), //欧标480KW（分体桩）
  YTS360CEAG1(269), //欧标360KW（分体桩）
  YTY240CEAG1_2(272) //YTY240CEAG1-2（一体桩）
  ;

  bool get isIntegratedChargeMaster {
    if (value >= 195 && value <= 209) {
      return true;
    }
    return false;
  } //一体机主机;

  static ProductIDType? getType(int value) =>
      ProductIDType.values.firstWhereOrNull((e) => e.value == value);

  final int value;
  const ProductIDType(this.value);
}

const _$ProductTypeEnumMap = {
  ProductType.pcs: 536,
  ProductType.bussinessEnergyStorage: 514,
  ProductType.pvIntervert: 515,
  ProductType.electricyMeter: 539,
  ProductType.aircondition: 538,
  ProductType.ems: 524,
  ProductType.batteryPack: 526,
  ProductType.fireFighting: 545,
  ProductType.chargeMaster: 546,
  ProductType.chargeTerminal: 547,
  ProductType.windTurbine: 548,
};

/// 公告状态
enum AdvertiseStatusType {
  normal('0'),
  close('1');

  final String value;
  const AdvertiseStatusType(this.value);

  String get label {
    switch (value) {
      case '1':
        return ResKey.close.tr;

      default:
        return ResKey.normal.tr;
    }
  }
}

const $AdvertiseStatusTypeEnumMap = {
  AdvertiseStatusType.normal: '0',
  AdvertiseStatusType.close: '1',
};

enum PowerUnitType {
  all('0'), // 全部
  powerGeneration('1'), // 发电单元
  storedEnergy('2'), // 储能单元
  powerConsumption('3'), // 用电单元
  otherUnit('4'); // 其他

  final String value;
  const PowerUnitType(this.value);

  String get label {
    if (value == '0') {
      return ResKey.all.tr;
    } else if (value == '1') {
      return ResKey.powergenUnit.tr;
    } else if (value == '2') {
      return ResKey.energyStorageUnit.tr;
    } else if (value == '3') {
      return ResKey.eleConsumptionUnit.tr;
    } else {
      return ResKey.otherUnit.tr;
    }
  }
}

/// 电站类型 Type of power station
@JsonEnum(valueField: "value")
enum PowerStationType {
  photovoltaic('1'),
  energyStorage('2'),
  chargingStation('3'),
  opticalStorage('12'),
  storageAndCharging('23'),
  photocharging('13'),
  pvStorageAndCharging('123');

  final String value;
  const PowerStationType(this.value);

  String get label {
    switch (value) {
      case '1':
        return ResKey.photovoltaic.tr;
      case '2':
        return ResKey.energyStorage.tr;
      case '3':
        return ResKey.chargingStation.tr;
      case '12':
        return ResKey.opticalStorage.tr;
      case '23':
        return ResKey.storageAndCharging.tr;
      case '13':
        return ResKey.photocharging.tr;
      case '123':
        return ResKey.opticalStorageAndCharging.tr;
      default:
        return '';
    }
  }

  static PowerStationType? getType(String? data) {
    return PowerStationType.values
        .firstWhereOrNull((element) => element.value == data);
  }
}

const $PowerStationTypeEnumMap = {
  PowerStationType.photovoltaic: '1',
  PowerStationType.energyStorage: '2',
  PowerStationType.chargingStation: '3',
  PowerStationType.opticalStorage: '12',
  PowerStationType.storageAndCharging: '23',
  PowerStationType.pvStorageAndCharging: '123',
};

//电价设置类型
enum ElecPriceType {
  mains(0), // 市电
  internet(1), // 上网
  charge(2), // 充电
  store(3); // 储能

  final int value;
  const ElecPriceType(this.value);
}

const $ElecPriceTypeEnumMap = {
  ElecPriceType.mains: 0,
  ElecPriceType.internet: 1,
  ElecPriceType.charge: 2,
  ElecPriceType.store: 3,
};

//市电电价状态
enum MainsElecStatusType {
  noneffective(0), // "未生效"
  effective(1); //"已生效"

  final int value;

  const MainsElecStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.siteSettingUnEffective.tr;
      case 1:
        return ResKey.siteSettingEffective.tr;
      default:
        return '';
    }
  }
}

const $MainsElecStatusTypeEnumMap = {
  MainsElecStatusType.noneffective: 0,
  MainsElecStatusType.effective: 1,
};

//上网电价状态
enum InternetElecStatusType {
  noneffective(0), // "未生效"
  effective(1); //"已生效"

  final int value;
  const InternetElecStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.siteSettingUnEffective.tr;
      case 1:
        return ResKey.siteSettingEffective.tr;
      default:
        return '';
    }
  }
}

const $InternetElecStatusTypeEnumMap = {
  InternetElecStatusType.noneffective: 0,
  InternetElecStatusType.effective: 1,
};

//充电电价状态
enum ChargeIdElecStatusType {
  noneffective(0), // "未生效"
  effective(1); //"已生效"

  final int value;
  const ChargeIdElecStatusType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.siteSettingUnEffective.tr;
      case 1:
        return ResKey.siteSettingEffective.tr;
      default:
        return '';
    }
  }
}

const $ChargeIdElecStatusTypeEnumMap = {
  ChargeIdElecStatusType.noneffective: 0,
  ChargeIdElecStatusType.effective: 1,
};

/// 统计数据单元状态
enum StatisticUnitStatusType {
  day('0'),
  month('1'),
  year('2'),
  accumulate('3');

  final String value;
  const StatisticUnitStatusType(this.value);

  String get label {
    switch (value) {
      case '0':
        return '日';
      case '1':
        return '月';
      case '2':
        return '年';
      case '3':
        return '累计';
      default:
        return '';
    }
  }
}

const $StatisticUnitStatusTypeEnumMap = {
  StatisticUnitStatusType.day: '0',
  StatisticUnitStatusType.month: '1',
  StatisticUnitStatusType.year: '2',
  StatisticUnitStatusType.accumulate: '3',
};

// 设备主从关系
@JsonEnum(valueField: "value")
enum MasterSlaveModeType {
  master(0),
  vice(1);

  final int value;
  const MasterSlaveModeType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.hostAbbr.tr;
      case 1:
        return ResKey.slaveAbbr.tr;
      default:
        return '';
    }
  }
}

const $MasterSlaveModeEnumMap = {
  MasterSlaveModeType.master: 0,
  MasterSlaveModeType.vice: 1,
};

/// 产品类型
@JsonEnum(valueField: "value")
enum ProductVersionType {
  rectangle(0),
  biwatt(1),
  selfDeveloped(2);

  final int value;
  const ProductVersionType(this.value);

  String get label {
    switch (value) {
      case 0:
        return '矩形';
      case 1:
        return '比瓦特';
      default:
        return '自研';
    }
  }
}

const $ProductVersionTypeEnumMap = {
  ProductVersionType.rectangle: 0,
  ProductVersionType.biwatt: 1,
  ProductVersionType.selfDeveloped: 2,
};

// functionType 标识ems或空调   0矩形 1比瓦特 2自研
/// 矩形 EMS远程控制指令类型
enum RectangleEmsTriggerInstrucType {
  sysStart('sysStart'),
  sysStop('sysStop'),
  sysReset('sysReset'),
  bmsClose('bmsClose'),
  bmsBreak('bmsBreak'),
  operateModel('operateModel');

  final String value;
  const RectangleEmsTriggerInstrucType(this.value);

  String get label {
    switch (value) {
      case 'sysStart':
        return '系统启动';
      case 'sysStop':
        return '系统停止';
      case 'sysReset':
        return '系统复位';
      case 'bmsClose':
        return 'BMS主接触器闭合';
      case 'bmsBreak':
        return 'BMS主接触器断开';
      case 'operateModel':
        return '手/自动切换';

      default:
        return '';
    }
  }
}

const $RectangleEmsTriggerInstrucTypeEnumMap = {
  RectangleEmsTriggerInstrucType.sysStart: 'sysStart',
  RectangleEmsTriggerInstrucType.sysStop: 'sysStop',
  RectangleEmsTriggerInstrucType.sysReset: 'sysReset',
  RectangleEmsTriggerInstrucType.bmsClose: 'bmsClose',
  RectangleEmsTriggerInstrucType.bmsBreak: 'bmsBreak',
  RectangleEmsTriggerInstrucType.operateModel: 'operateModel',
};

enum AuthorityModeType { within, include, exclude }

/// 物模型的展示方式
@JsonEnum(valueField: "value")
enum DeviceModelShowType {
  hideName(1),
  input(2),
  picker(3),
  switcher(4),
  switchButton(5),
  grid(6),
  button(7),
  others(99);

  final int value;
  const DeviceModelShowType(this.value);
}

///充电枪充电方式 var chargingType =  '--';//充电方式 0 刷卡 1-App启动2-本地管理员3-Vin码4-密码 5-手动
enum ChargingType {
  swipe(0),
  appStart(1),
  admin(2),
  vinPwd(3),
  pwd(4),
  manual(5);

  final int value;
  const ChargingType(this.value);
  String get label {
    switch (value) {
      case 0:
        return ResKey.deviceCard.tr; //刷卡
      case 1:
        return ResKey.deviceApp.tr; //app启动
      case 2:
        return ResKey.deviceLocalManage.tr; //本地管理员
      case 3:
        return ResKey.deviceVin.tr; //vin
      case 4:
        return ResKey.devicePassword.tr; //密码
      case 5:
        return ResKey.thingsHandMovement.tr; // '手动';

      default:
        return '--';
    }
  }
}

enum SiteEnergyOptionType {
  photovolatic('1'),
  storage('2'),
  charge('3');

  final String value;
  const SiteEnergyOptionType(this.value);
}

enum DateTimePickerMode { year, month, day, minute, all }

enum MapType {
  amap(0),
  googleMap(1);

  final int value;
  const MapType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.aMap.tr;
      case 1:
        return ResKey.googleMaps.tr;
      default:
        return '';
    }
  }
}

enum LaunchMapType {
  amap(0),
  googleMap(1),
  baiduMap(2),
  tencentMap(3),
  appleMap(4);

  final int value;
  const LaunchMapType(this.value);

  String get label {
    switch (value) {
      case 0:
        return ResKey.aMap.tr;
      case 1:
        return ResKey.googleMaps.tr;
      case 2:
        return ResKey.baiduMap.tr;
      case 3:
        return ResKey.tencentMap.tr;
      case 4:
        return ResKey.appleMap.tr;
      default:
        return '';
    }
  }
}

enum AuthorityType { edit, detail }

/// 告警页类型
/// all：全部告警，site：站点告警，device：设备告警
enum AlarmPageType {
  all,
  site,
  device,
}
